//---------------------------------------------------------------------------

#ifndef ZAP_ZAIAVKIH
#define ZAP_ZAIAVKIH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "cxContainer.hpp"
#include "cxControls.hpp"
#include "cxDBEdit.hpp"
#include "cxEdit.hpp"
#include "cxGraphics.hpp"
#include "cxGroupBox.hpp"
#include "cxLookAndFeelPainters.hpp"
#include "cxLookAndFeels.hpp"
#include "cxMaskEdit.hpp"
#include "cxSpinEdit.hpp"
#include "cxTextEdit.hpp"
#include "cxTimeEdit.hpp"
#include "DBCtrlsEh.hpp"
#include "Fr_Pribor.h"
#include <DBCtrls.hpp>
#include <ExtCtrls.hpp>
#include <Mask.hpp>
#include <DB.hpp>
#include "cxButtons.hpp"
#include <ActnList.hpp>
#include <Menus.hpp>
#include "cxRadioGroup.hpp"
#include <DBGrids.hpp>
#include <Grids.hpp>
#include "DBAccess.hpp"
#include "IBC.hpp"
#include "MemDS.hpp"
//---------------------------------------------------------------------------
class TfrZAP_ZAIAVKI : public TForm
{
__published:	// IDE-managed Components
	TPanel *pZAIAVKA1;
	TcxGroupBox *gbZAIVKA1;
	TLabel *Label1;
	TDBEdit *dbeNOM;
	TLabel *Label2;
	TDBDateTimeEditEh *dtpDATA_POST;
	TLabel *Label3;
	TFrame_Pribor *Frame_Pribor1;
	TLabel *Label4;
	TLabel *Label5;
	TLabel *Label6;
	TDBDateTimeEditEh *dtpNA_DATU;
	TLabel *Label7;
	TcxDBTimeEdit *edTIME;
	TLabel *Label8;
	TLabel *Label9;
	TDBEdit *dbePHONE;
	TLabel *Label10;
	TDBEdit *dbePrim;
	TDBLookupComboBox *cbOBORUD;
	TDBLookupComboBox *cbTIP_JOB;
	TDBLookupComboBox *cbJOB;
	TDBLookupComboBox *cbVID_JOB;
	TDBLookupComboBox *cbDO_POSLE;
	TDBLookupComboBox *cbSOTR;
	TLabel *Label11;
	TcxButton *btCancel;
	TcxButton *btSave;
	TActionList *ActionList1;
	TAction *Save;
	TAction *Cancel;
	TLabel *Label12;
	TDBLookupComboBox *cbStatus;
	TEdit *edKOD;
	TLabel *Label13;
	TcxButton *btSPR_HAR_JOB;
	TAction *SPR_HAR_JOB;
	TcxButton *cxButton1;
	TAction *SPR_JOB;
	TcxButton *cxButton2;
	TAction *SPR_SOTR_VDGO;
	TcxGroupBox *gbZ_PO_SOTR;
	TDBGrid *sgPO_SOTR;
	TLabel *Label14;
	TDBText *labKOL_PRIN;
	TLabel *Label15;
	TDBText *labKOL_VIPOLN;
	TcxButton *btPO_RAIONU;
	TAction *PO_RAIONU;
	TDBLookupComboBox *cbVID_GAZA;
	TIBCQuery *dsetZAIAVKA;
	TIBCQuery *dsetJOB;
	TIBCQuery *dsetKOD_PRIB;
	TIBCQuery *dsetF_PRIB;
	TIBCQuery *dsetPO_SOTR;
	TIBCQuery *dsetKOL_PRIN;
	TIBCQuery *dsetKOL_VIPOL;
	TIBCDataSource *dsZAIAVKA;
	TIBCDataSource *dsJOB;
	TIBCDataSource *dsKOD_PRIB;
	TIBCDataSource *dsF_PRIB;
	TIBCDataSource *dsPO_SOTR;
	TIBCDataSource *dsKOL_PRIN;
	TIBCDataSource *dsKOL_VIPOL;
	TIBCQuery *dsetPRIN_OBORUD;
	TIBCDataSource *dsPRIN_OBORUD;
	void __fastcall FormActivate(TObject *Sender);
	void __fastcall cbOBORUDClick(TObject *Sender);
	void __fastcall FormKeyPress(TObject *Sender, char &Key);
	void __fastcall cbTIP_JOBClick(TObject *Sender);
	void __fastcall cbVID_JOBClick(TObject *Sender);
	void __fastcall SaveExecute(TObject *Sender);
	void __fastcall dbeNOMKeyDown(TObject *Sender, WORD &Key, TShiftState Shift);
	void __fastcall dtpDATA_POSTKeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);
	void __fastcall cbJOBClick(TObject *Sender);
	void __fastcall dtpNA_DATUKeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);
	void __fastcall cbDO_POSLEClick(TObject *Sender);
	void __fastcall cbSOTRClick(TObject *Sender);
	void __fastcall cbStatusClick(TObject *Sender);
	void __fastcall dbePHONEKeyDown(TObject *Sender, WORD &Key, TShiftState Shift);
	void __fastcall dbePrimKeyDown(TObject *Sender, WORD &Key, TShiftState Shift);
	void __fastcall edTIMEKeyDown(TObject *Sender, WORD &Key, TShiftState Shift);
	void __fastcall CancelExecute(TObject *Sender);
	void __fastcall rbPrirodnClick(TObject *Sender);
	void __fastcall SPR_HAR_JOBExecute(TObject *Sender);
	void __fastcall SPR_JOBExecute(TObject *Sender);
	void __fastcall SPR_SOTR_VDGOExecute(TObject *Sender);
	void __fastcall FormShow(TObject *Sender);
	void __fastcall PO_RAIONUExecute(TObject *Sender);
	void __fastcall cbVID_GAZAClick(TObject *Sender);
	void __fastcall Frame_Pribor1cbMODELClick(TObject *Sender);
private:	// User declarations
public:		// User declarations
int NOM_ABON,KOD_PRIB,TIP_PRIB,Stat_ADD,KOD_GAZ;
String FIO, DAT_PRIN,DOM;
	__fastcall TfrZAP_ZAIAVKI(TComponent* Owner);
	void __fastcall TfrZAP_ZAIAVKI::Clear();
	void __fastcall TfrZAP_ZAIAVKI::Z_Save();
	void __fastcall TfrZAP_ZAIAVKI::SQL();
	void __fastcall TfrZAP_ZAIAVKI::Edit_KART();
	void __fastcall TfrZAP_ZAIAVKI::Obnovi();

};
//---------------------------------------------------------------------------
extern PACKAGE TfrZAP_ZAIAVKI *frZAP_ZAIAVKI;
//---------------------------------------------------------------------------
#endif
